Learn T-SQL Commands with Samples
Skip Navigation Links
Skip Navigation Links.
Expand DatabaseDatabase
Expand TableTable
Expand ViewView
Expand Stored ProcedureStored Procedure
Expand Data FilteringData Filtering
Expand Data GroupingData Grouping
Expand JoinsJoins
Expand TriggerTrigger
Expand CursorCursor
Expand OperatorsOperators
Expand ConstraintsConstraints
Expand FunctionsFunctions
Expand Conditional ProcessingConditional Processing
Expand LoopingLooping
Expand Error HandlingError Handling
Expand v.IMP Queriesv.IMP Queries
Expand XMLXML
Expand Query PerformanceQuery Performance
Expand QueriesQueries
Expand NormalizationNormalization
Collapse CreateCreate
     

User Defined Table Type

 
      CREATE TYPE dbo.TVP AS TABLE
      (
          ID int NOT NULL,
          Name char(10) NULL,
          DOB datetime NULL,
          PRIMARY KEY (ID)
      )
      
      
---- Drop the table type - this will fail if it is being used
DROP TYPE dbo.TVP GO